package effectiveJava.staticMethod;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

public class Demo1 {
	public static <K, V> Map<K, V> HashMap() {
		//这样就避免了写一大段代码
		return new HashMap<K, V>();
	}

	public static void main(String[] args) {
		Map<String, Object> map = Demo1.HashMap();
		map.put("result", 1);
		Set<Entry<String, Object>> set = map.entrySet();
		for (Entry<String, Object> entry : set) {
			System.out.println(entry.getKey() + entry.getValue());
		}
	}
}
